#ifndef _MONTECARLO_H
#define _MONTECARLO_H

typedef struct
{
	unsigned long int seed, n;
	gmp_randstate_t r_state;
	mpz_t iRand;
	mpf_t aux1, aux2, aux3, aux4;
	mpf_t x, y;
} RANDCORE;

typedef struct
{
	mpf_t in, all, pi;
} COUNTERS;

void init_randcore(RANDCORE* rc);
int get_rand_point(RANDCORE* rc);
void clear_randcore(RANDCORE* rc);
void init_counters(COUNTERS* c);
void clear_counters(COUNTERS* c);
void add_count(COUNTERS* c, int f);
void calc_pi(COUNTERS* c);
void save_it(COUNTERS* c, char* name);

#endif
